home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / custdata.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  1.4 KB  |  42 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #include <vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "CustData.h"
  10. #include "DM.h"
  11. #include "Toolbar.h"
  12. #include "CustOrds.h"
  13. //---------------------------------------------------------------------------
  14. #pragma resource "*.dfm"
  15. TfmCustomer *fmCustomer;
  16. //---------------------------------------------------------------------------
  17. __fastcall TfmCustomer::TfmCustomer(TComponent* Owner)
  18.   : TForm(Owner)
  19. {
  20. }
  21. //---------------------------------------------------------------------------
  22. void __fastcall TfmCustomer::FormActivate(TObject *Sender)
  23. {
  24.   fmToolbar->SetNavigator(DM1->CustomersSource);
  25. }
  26. //---------------------------------------------------------------------
  27. void __fastcall TfmCustomer::FormClose(TObject *Sender,
  28.       TCloseAction &Action)
  29. {
  30.   int I;
  31.   bool bl = false;
  32.  
  33.   for(I=Application->ComponentCount; I==1;I--)
  34.   {
  35.     if(Application->Components[I] == fmCustOrd)
  36.       bl = true;
  37.     if(!bl)
  38.       fmToolbar->DBNavigator1->DataSource = NULL;
  39.     Action = caFree;
  40.   }
  41. }
  42. //---------------------------------------------------------------------